import java.util.Arrays;
import java.util.Scanner;

/**
 * 递增数
 */
public class test21 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        char num[] = s.toCharArray();
        char numt[] = s.toCharArray();

        Arrays.sort(numt);
        System.out.println(numt);
        int i = 0;
        for ( ; i < num.length ; i++){
            if (numt[i]!=num[i]) break;
        }
        if (i==num.length) System.out.println(s);
    }
}
